package com.wuzf.libnetwork;

public class ResultResponse<T> {

    private boolean success = false;
    private int status = -1;
    private String message = "";
    private T body = null;

    public ResultResponse() {
    }

    public ResultResponse(boolean success, int status, String message, T body) {
        this.success = success;
        this.status = status;
        this.message = message;
        this.body = body;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getBody() {
        return body;
    }

    public void setBody(T body) {
        this.body = body;
    }

    @Override
    public String toString() {
        return "ResultResponse{" +
                "success=" + success +
                ", status=" + status +
                ", message='" + message + '\'' +
                ", body=" + body +
                '}';
    }
}
